Phase 6: UI DataPact Mappings β Implementation Plan
Overview
Practice-to-contract mapping UI page for the DataPact integration module.
Scope
- Backend: Add
POST /api/datapact/suggestendpoint to expose auto-suggest service - Frontend:
DataPactMappingsPagewith mapping table, add/remove, auto-suggest, domain filter - Frontend: Tab navigation between Settings and Mappings pages
- Frontend: Admin users (system_admin) can access DataPact pages without org membership
- Tests: Backend test for suggest endpoint, frontend vitest tests for mappings page
Files Changed
Backend
cmmc/routers/datapact.pyβ add suggest endpointtests/test_datapact_api.pyβ add suggest tests
Frontend
ui/src/types/datapact.tsβ addMappingSuggestiontypeui/src/services/datapact.tsβ addsuggestMappings()functionui/src/modules/datapact/DataPactMappingsPage.tsxβ new page componentui/src/modules/datapact/DataPactMappingsPage.test.tsxβ testsui/src/modules/datapact/DataPactNav.tsxβ shared tab navigationui/src/modules/datapact/DataPactSettingsPage.tsxβ add nav, admin org selectorui/src/modules/datapact/DataPactSettingsPage.test.tsxβ update title expectationui/src/App.tsxβ add/datapact/mappingsroute
Testing
make test-backendfor suggest endpoint testsmake test-frontendfor mappings page tests